// 文字 背景
$--color-routine: #757780 !default; // 常规文字
$--color-secondary: #acadb5 !default; // 次级文字
$--color-second-evel: #c6c7cc !default; // 二级文字
$--color-second-evel: #cdced4 !default; // 占位文字
$--color-white: #fff !default; // 白色文字
$--color-black: #40424c !default; // 主色文字
$--background-primary: #f0f2f7 !default; // 主色系背景
$--border-color-base: #e3e3e3; // 一般边框颜色
//$--border-color-base: #F0F2F7; // 一般边框颜色
$--border-style-base: 1px solid $--border-color-base;
$--color-primary: #2C84EE !default;
$--background-color-base: #f5f7fa !default;
// 模块阴影
@mixin boxShadow {
  background: $--color-white;
  box-shadow: 0px 4px 24px 0px rgba(24, 28, 85, 0.24);
}

// 单行文本 超出隐藏
@mixin textEllipsis {
  overflow: hidden; //超出的文本隐藏
  text-overflow: ellipsis; //溢出用省略号显示
  white-space: nowrap;
}

// 多行文本超出隐藏
@mixin manyEllipsis ($row: 2) {
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: $row;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break:break-all;
}

// 清浮动
@mixin clearfix {
  &:after {
    content: "";
    display: table;
    clear: both;
  }
}

// 滚动条
@mixin scrollBar($w: 6px, $h: 6px, $bg: #e6e7ed, $color: #f5f5f5, $hoverColor: #C8C9CF , $activeColor: #9C9DA1) {
  box-sizing: border-box;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  &::-webkit-scrollbar {
    width: $w;
    height: $h;
  }
  &::-webkit-scrollbar-thumb {
    background-color: $bg;
    border-radius: 6px;
    &:hover {
      background-color: $hoverColor;
    }
    &:active {
      background-color: $activeColor;
    }
  }
  &::-webkit-scrollbar-track {
    background-color: $color;
    border-radius: 6px;
  }
}

// 相对定位
@mixin relative {
  position: relative;
  width: 100%;
  height: 100%;
}

// 相对定位且 剧中显示
@mixin pct($pct) {
  width: #{$pct};
  position: relative;
  margin: 0 auto;
}

// 三角形
@mixin triangle($width, $height, $color, $direction) {
  $width: $width/2;
  $color-border-style: $height solid $color;
  $transparent-border-style: $width solid transparent;
  height: 0;
  width: 0;

  @if $direction==up {
    border-bottom: $color-border-style;
    border-left: $transparent-border-style;
    border-right: $transparent-border-style;
  } @else if $direction==right {
    border-left: $color-border-style;
    border-top: $transparent-border-style;
    border-bottom: $transparent-border-style;
  } @else if $direction==down {
    border-top: $color-border-style;
    border-left: $transparent-border-style;
    border-right: $transparent-border-style;
  } @else if $direction==left {
    border-right: $color-border-style;
    border-top: $transparent-border-style;
    border-bottom: $transparent-border-style;
  }
}
